/*
 * Copyright (C) 2010-2016 Softtek Information Systems (Wuxi) Co.Ltd.
 * Date:2016-03-31
 */

package com.jarvis.pzz.seervers;

import com.jarvis.pzz.common.ResponseData;
import com.jarvis.pzz.models.AdvModel;
import com.jarvis.pzz.models.FeedBackModel;
import com.jarvis.pzz.models.FindShopModel;
import com.jarvis.pzz.models.InitFindShopModel;
import com.jarvis.pzz.models.LoginModel;
import com.jarvis.pzz.models.MainIndexModel;
import com.jarvis.pzz.models.MyCollectModel;
import com.jarvis.pzz.models.MyPublishShopsListModel;
import com.jarvis.pzz.models.RequireBannerModel;
import com.jarvis.pzz.models.RequirementInfoModel;
import com.jarvis.pzz.models.ShopDetailsModel;
import com.jarvis.pzz.models.ShopsListByFilterModel;
import com.jarvis.pzz.models.ShopsListModel;
import com.jarvis.pzz.models.ShopsSearchModel;
import com.jarvis.pzz.models.UpdateModel;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by jarvis.liu on 9/13/2016.
 */
public interface RequestService {

    /**
     * 更新
     */
    @FormUrlEncoded
    @POST("android/androidUpdate")
    Call<ResponseData<UpdateModel>> update(
            @Field("versionCode") String identifyCode);
    /**
     * 登录
     */
    @FormUrlEncoded
    @POST("user/login")
    Call<ResponseData<LoginModel>> login(
            @Field("phoneNumber") String phoneNumber,
            @Field("identifyCode") String identifyCode);
    /**
     * 2.	登出
     */
    @POST("user/loginOut")
    Call<ResponseData> loginOut();

    //4.	短信发送接口
    @FormUrlEncoded
    @POST("sms/SendMessage")
    Call<ResponseData> sendMessage(
            @Field("phoneNumber") String phoneNumber,
            @Field("currentTime") String currentTime,
            @Field("secretToken") String secretToken
    );

    /**
     * 5.	App首页
     */
    @POST("shop/index")
    Call<ResponseData<MainIndexModel>> index();

    /**
     * 5.	需求轮播图
     */
    @POST("shop/getShopInfoAdvList")
    Call<ResponseData<RequireBannerModel>> getShopInfoAdvList();

    /**
     * 7.	查询商铺的条件集合
     *
     * @return
     */
    @POST("shop/getShopsSearchParams")
    Call<ResponseData<ShopsSearchModel>> getShopsSearchParams();

    /**
     * 6.	根据查询条件查询商铺list
     *
     * @return
     */
    @FormUrlEncoded
    @POST("shop/getShopsListByFilter")
    Call<ResponseData<ShopsListByFilterModel>> getShopsListByFilter(
            @Field("searchParam") String searchParam,
            @Field("areaId") String areaId,
            @Field("measureArea") String measureArea,
            @Field("priceArea") String priceArea,
            @Field("shopType") String shopType,
            @Field("shopSaleType") String shopSaleType,
            @Field("shopRunIndustry") String shopRunIndustry,
            @Field("shopLabelId") String shopLabelId,
            @Field("businessArea") String businessArea,
            @Field("currentPage") int currentPage,
            @Field("pageSize") int pageSize,
            @Field("type") String type
    );

    /***
     * 10.转铺/卖铺的商铺简单信息上传（saveShop）
     **/

    @FormUrlEncoded
    @POST("shop/saveShop")
    Call<ResponseData> getsaveShop(
            @Field("shopSaleType") String shopSaleType,
            @Field("shopLeftImgPath") String shopLeftImgPath,
            @Field("shopImgPath") String shopImgPath,
            @Field("shopRightImgPath") String shopRightImgPath,
            @Field("shopMeasureArea") String shopMeasureArea,
            @Field("shopAddress") String shopAddress,
            @Field("shopOwnerPhone") String shopOwnerPhone,
            @Field("shopLocation") String shopLocation
    );

    /**
     * 11.发布求租/买铺信息初始化
     *
     * @return
     */
    @FormUrlEncoded
    @POST("release/initFindShop")
    Call<ResponseData<InitFindShopModel>> getInitFindShop(
            @Field("userId") String userId
    );

    /**
     * 12 发布求租信息
     *
     * @return
     */
    @FormUrlEncoded
    @POST("release/addFindShop")
    Call<ResponseData> getaddFindShop(
            @Field("reqType") String reqType,
            @Field("reqRentType") String reqRentType,
            @Field("reqRentStart") int reqRentStart,
            @Field("reqRentEnd") int reqRentEnd,
            @Field("reqMeasureAreaStart") int reqMeasureAreaStart,
            @Field("reqMeasureAreaEnd") int reqMeasureAreaEnd,
            @Field("reqAddressArea") String reqAddressArea,
            @Field("reqContactName") String reqContactName,
            @Field("reqContactPhone") String reqContactPhone,
            @Field("reqRunBusiness") String reqRunBusiness,
            @Field("reqIntroduce") String reqIntroduce,
            @Field("reqRentLift") String reqRentLift,
            @Field("reqIscertificates") String reqIscertificates,
            @Field("reqIstransferfee") String reqIstransferfee,
            @Field("reqIntentionFloor") String reqIntentionFloor,
            @Field("reqIntentionShop") String reqIntentionShop,
            @Field("reqInstallationIds") String reqInstallationIds

    );

    /**
     * 14.发布买铺信息
     * >>>>>>> 788a0a84996815f4b03fa429ca14f58d56af9cb9
     *
     * @return
     */
    @FormUrlEncoded
    @POST("shop/getShopsInfo")
    Call<ResponseData<ShopDetailsModel>> getShopsInfo(
            @Field("shopId") String shopId
    );
    @FormUrlEncoded
    @POST("release/addFindShop")
    Call<ResponseData> getBuyFindShops(
            @Field("reqType") String reqType,
            @Field("reqRentStart") int reqRentStart,
            @Field("reqMeasureAreaStart") int reqMeasureAreaStart,
            @Field("reqAddressArea") String reqAddressArea,
            @Field("reqContactPhone") String reqContactPhone,
            @Field("reqRunBusiness") String reqRunBusiness,
            @Field("reqInstallationIds") String reqInstallationIds

    );


    /**
     * 16.发布转铺、卖铺信息成功后,点击”发布完成”返回匹配的list(找铺，买铺)
     *
     * @return
     */
    @FormUrlEncoded
    @POST("release/getFindShopList")
    Call<ResponseData<FindShopModel>> getFindShopList(
            @Field("shopMeasureArea") String shopMeasureArea,
            @Field("shopSaleType") String shopSaleType

    );

    /**
     * 17.查询需求详情（getRequirementInfo）
     *
     * @return
     */
    @FormUrlEncoded
    @POST("release/getRequirementInfo")
    Call<ResponseData<RequirementInfoModel>> getRequirementInfo(
            @Field("reqId") String reqId

    );

    /**
     * 9.	收藏商铺（shopCollect）
     *
     * @return
     */
    @FormUrlEncoded
    @POST("shop/shopCollect")
    Call<ResponseData> shopCollect(
            @Field("shopId") String shopId,
            @Field("type") String type);

    /**
     * 18.我发布的需求list（myRelease）
     *
     * @return
     */
    @FormUrlEncoded
    @POST("person/myRelease")
    Call<ResponseData<MyCollectModel>> myRelease(
            @Field("currentPage") String currentPage,
            @Field("pageSize") String pageSize

    );

    /**
     * 6.	求购/求租信息list（getReleaseList）
     *
     * @return
     */
    @FormUrlEncoded
    @POST("release/getReleaseList")
    Call<ResponseData<MyCollectModel>> getReleaseList(
            @Field("reqType") String reqType,
            @Field("currentPage") String currentPage,
            @Field("pageSize") String pageSize

    );

    /**
     * 21.我发布的铺源list（getMyPublishShopsList）
     *
     * @return
     */
    @FormUrlEncoded
    @POST("shop/getMyPublishShopsList")
    Call<ResponseData<MyPublishShopsListModel>> getMyPublishShopsList(
            @Field("currentPage") String currentPage,
            @Field("pageSize") String pageSize

    );


    /**
     * 我的收藏list（myCollect）
     *
     * @return
     */
    @FormUrlEncoded
    @POST("person/myCollect")
    Call<ResponseData<ShopsListByFilterModel>> myCollect(
            @Field("currentPage") String currentPage,
            @Field("pageSize") String pageSize

    );

    /**
     * 12.	地图找铺接口（getShopsListWithLocation）
     *
     * @return
     */
    @GET("shop/getShopsListWithLocation")
    Call<ResponseData<ShopsListModel>> getShopsListWithLocation(

    );
    /**
     * 12.	地图找铺接口（getShopsListWithLocationFilter）
     *
     * @return
     */
    @GET("shop/getShopsListWithLocationFilter")
    Call<ResponseData<ShopsListModel>> getShopsListWithLocationFilter(
            @Query("range") int range,
            @Query("latitude") String latitude,
            @Query("longitude") String longitude
    );

    /**
     * 5.	获取启动广告接口（getAdv）
     *
     * @return
     */
    @GET("user/getAdv")
    Call<ResponseData<AdvModel>> getAdv(

    );


    /**
     * 14.发布找铺信息成功后,点击”发布完成”返回匹配的list(转铺)
     *
     * @return
     */
    @FormUrlEncoded
    @POST("release/getRentShopList")
    Call<ResponseData<ShopsListByFilterModel>> getRentShopList(
            @Field("reqType") String reqType,
            @Field("reqRentType") String reqRentType,
            @Field("reqRentStart") int reqRentStart,
            @Field("reqRentEnd") int reqRentEnd,
            @Field("reqMeasureAreaStart") int reqMeasureAreaStart,
            @Field("reqMeasureAreaEnd") int reqMeasureAreaEnd,
            @Field("reqAddressArea") String reqAddressArea,
            @Field("reqContactName") String reqContactName,
            @Field("reqContactPhone") String reqContactPhone,
            @Field("reqRunBusiness") String reqRunBusiness,
            @Field("reqIntroduce") String reqIntroduce,
            @Field("reqRentLift") String reqRentLift,
            @Field("reqIscertificates") String reqIscertificates,
            @Field("reqIstransferfee") String reqIstransferfee,
            @Field("reqIntentionFloor") String reqIntentionFloor,
            @Field("reqIntentionShop") String reqIntentionShop,
            @Field("reqInstallationIds") String reqInstallationIds

    );

    /***
     * 16.发布买铺信息成功后,点击”发布完成”返回匹配的list(卖铺)
     */
    @FormUrlEncoded
    @POST("release/getSaleShopList")
    Call<ResponseData<ShopsListByFilterModel>> getSaleShopList(
            @Field("reqType") String reqType,
            @Field("reqRentStart") int reqRentStart,
            @Field("reqMeasureAreaStart") int reqMeasureAreaStart,
            @Field("reqAddressArea") String reqAddressArea,
            @Field("reqContactPhone") String reqContactPhone,
            @Field("reqRunBusiness") String reqRunBusiness,
            @Field("reqInstallationIds") String reqInstallationIds
    );

    /***
     * 23.	我的反馈list（getFeedbackList）
     */
    @POST("person/getFeedbackList")
    Call<ResponseData<List<FeedBackModel>>> getFeedbackList(
    );

    /**
     * 25.删除商铺（delShop）
     **/
    @FormUrlEncoded
    @POST("shop/delShop")
    Call<ResponseData> delShop(
            @Field("shopId") String shopId);

    /**
     * 24.	发布反馈（delShop）
     **/
    @FormUrlEncoded
    @POST("person/saveFeedback")
    Call<ResponseData> saveFeedback(
            @Field("content") String content);

    /***
     * 22.编辑更新商铺信息（updateShop）
     */
    @FormUrlEncoded
    @POST("shop/updateShop")
    Call<ResponseData> getUpdateShop(
            @Field("shopId") String shopId,
            @Field("shopImgPath") String shopImgPath,
            @Field("shopLeftImgPath") String shopLeftImgPath,
            @Field("shopRightImgPath") String shopRightImgPath,
            @Field("shopMeasureArea") String shopMeasureArea,
            @Field("shopAddress") String shopAddress,
            @Field("shopOwnerPhone") String shopOwnerPhone,
            @Field("shopLocation") String shopLocation,
            @Field("shopIntroduce") String shopIntroduce,
            @Field("shopRent") String shopRent,
            @Field("shopRentType")String shopRenttype

    );
    /**
     * 	删除（delShop）
     **/
    @FormUrlEncoded
    @POST("release/delRequirement")
    Call<ResponseData> delRequirement(
            @Field("reqId") String  reqId);

}
